
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:package_info/package_info.dart';

enum Env {
  PROD,
  DEV,
}

class GCConfig {

  static Env env;

  bool debug;
  Level loggerLevel;
  // String apiBaseUrl;
  PackageInfo packageInfo;
  Directory appDocDir;
  ThemeData theme;
  String aliUrlSchema;
  String wechatAppid;
  String wechatUniversalLink;

  String get apiBaseUrl {
    switch (env) {
      case Env.PROD:
        return "https://www.grownest.cn/v5";
        break;
      case Env.DEV:
        return "http://test.grownest.cn:8030";
        break;
    }
  }

  GCConfig({
    this.debug,
    this.loggerLevel = Level.INFO,
    this.theme,
    this.aliUrlSchema = ali_url_schema,
    this.wechatAppid = wechat_appid,
    this.wechatUniversalLink = wechat_universal_link
  });
}

// const String api_base_url = "http://test.grownest.cn:8040";
const String ali_url_schema = "com.grownest.test";
const String wechat_appid = "wx1131861be3ce6890";
const String wechat_universal_link = "https://www.grownest.cn/";

